#pragma once
#include "cocos2d.h"
#include "Box2D/Box2D.h"
class SpriteMonster;
class ParallaxLayer:public cocos2d::CCParallaxNode
{
public:
	ParallaxLayer(void);
	~ParallaxLayer(void);
	void SetSpeed(const b2Vec2 &vecSpeed);
	void SetEnableGravity(bool bEnable);
	static ParallaxLayer *node();
	bool init();
	void update(float fTime);
	void getRemoveChild(std::vector<SpriteMonster *> &removeChildren);
	void removeChildren(std::vector<SpriteMonster *> &removeChildren);
	float getPhysicsYSpeed();
	
	
	
private:
	//void updatePhysicsPos(const b2Vec2 &posAdd,float fTime);
	//void updateSpritePos(const cocos2d::CCPoint &ptAdd);
	bool  bEnableGravity_;
	b2Vec2 vecSpeed_;
	
};
